/*
 管理连接db客户端
*/

#pragma once
#include "base_include.h"

struct DbCfg
{
	struct Mongodb
	{
		std::string db_ip;
		std::string db_name;
		uint16 db_port;
		std::string db_psw;
		std::string db_user;
	};
	struct Mysql
	{
		std::string db_ip;
		std::string db_name;
		uint16 db_port;
		std::string db_psw;
		std::string db_user;
	};

	std::string ip;
	uint16 port;
	std::string select_db;
	Mongodb mongodb_db;
	Mysql mysql_db;
};

class CfgMgr : public Singleton<CfgMgr>
{
public:
	DbCfg m_cfg;

public:
	bool Init();

};